<template>
  <InvestPro v-if="appStore.isProBet" ref="investDom" />
  <Invest ref="investDom" v-else />
</template>

<script setup lang="ts">
import { defineAsyncComponent, ref } from 'vue'
// import Invest from '@/components/game/xglhc/xglhc.vue'
// import InvestPro from '@/components/game/xglhc/betPro.vue'
import { useAppStore } from '@/stores/app'
const Invest = defineAsyncComponent(() => import('@/components/game/xglhc/xglhc.vue'))
const InvestPro = defineAsyncComponent(() => import('@/components/game/xglhc/betPro.vue'))
const investDom = ref()

const appStore = useAppStore()

const open = () => {
  investDom.value?.open?.()
}

defineExpose({
  open,
})
</script>
